#ifndef ALIENGEN_SERIALLINE_H
#define ALIENGEN_SERIALLINE_H

#include <iostream>
#include <string>

#include <Qt>
#include <QDebug>
#include <cstdio>
#include <cerrno>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <termios.h>

class AlienGenSerialLine
{
public:
    AlienGenSerialLine(const std::string &port);
    ~AlienGenSerialLine();

	bool setSpeed(int speed);
    int open();
    int waitForData(int timeout);
    char readByte();
    int writeByte(char c);
    int writeCommand(char* data);
    int close();
private:
    std::string _port;
    int _fd;
	int _speed;
};

#endif // ALIENGEN_SERIALLINE_H
